﻿namespace com.crownpack
{
    using System.Linq;

    using com.crownpack.Extensions.SymbolExtensions;
    using com.crownpack.SharePoint;

    using Microsoft.SharePoint;

    public class Final_Definition_SiteLevel : CustomBaseDefinition
    {
        #region Constructors

        public Final_Definition_SiteLevel( SPFeatureReceiverProperties properties )
            : base(properties)
        {
        }

        ~Final_Definition_SiteLevel( )
        {
            Dispose( false );
        }

        #endregion Constructors

        #region Properties

        public static ContentTypeDefn BaseInitiative
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.BaseInitiative,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A271419",
                    Group = "com.crownpack",
                    Description = "Defines the base initiative.",
                    TitleName = "Initiative Description",
                    Fields = new FieldDefn[ ] {
                    // CPCustomer column
                    new FieldDefn{ Name = Column.Location, Required = true },

                    // synchronization columns
                    new FieldDefn{ Name = Column.InitiativeDisplayUrl, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeEditUrl, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeListID, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeItemID, Hidden = true },

                    // external content columns (read only)
                    new FieldDefn{ Name = Column.ParentCustomerNo, Hidden = true },
                    new FieldDefn{ Name = Column.ParentCustomerName, Hidden = true },
                    new FieldDefn{ Name = Column.NA_ManagerNo, Hidden = true },
                    new FieldDefn{ Name = Column.NA_ManagerEmailAddress, Hidden = true },
                    new FieldDefn{ Name = Column.NA_ManagerPhone, Hidden = true },
                    new FieldDefn{ Name = Column.Salesrep, Hidden = true },
                    new FieldDefn{ Name = Column.Branch, Hidden = true },

                    // currency columns
                    new FieldDefn{ Name = Column.RemainingCurrentYearBalance, Hidden = true },
                    new FieldDefn{ Name = Column.RemainingInitiativeBalance, Hidden = true },

                    // date columns
                    new FieldDefn{ Name = Column.ImplementationDate, Hidden = true },
                    new FieldDefn{ Name = Column.InProcessDate, Hidden = true },
                    new FieldDefn{ Name = Column.ProposedDate, Hidden = true },
                    new FieldDefn{ Name = Column.YearEnd, Hidden = true },

                    // note columns
                    new FieldDefn{ Name = Column.InitiativeDetail, Required = true },
                    new FieldDefn{ Name = Column.RejectionReason_, Hidden = true },

                    // number columns
                    new FieldDefn{ Name = Column.DaysInProcess, Hidden = true },
                    new FieldDefn{ Name = Column.DaysProposed, Hidden = true },

                    // text columns
                    //new FieldDefn{ Name = Column.IDDupe, Hidden = true },
                    new FieldDefn{ Name = Column.JDECostSavingsNo, Hidden = true },

                    // calculated columns
                    new FieldDefn{ Name = Column.CalendarDaysRemaining, Hidden = true },
                    new FieldDefn{ Name = Column.CalendarMonthsRemainingInCurrentYear, Hidden = true },
                    new FieldDefn{ Name = Column.DaysProcessedDaysProposed, Hidden = true },
                    new FieldDefn{ Name = Column.DaysOld, Hidden = true },
                    new FieldDefn{ Name = Column.ExpirationDate, Hidden = true },
                    new FieldDefn{ Name = Column.EstimatedTotalSavings, Hidden = true },
                    new FieldDefn{ Name = Column.RealizationBalance, Hidden = true },
                    new FieldDefn{ Name = Column.RealizationBalance2, Hidden = true },
                    new FieldDefn{ Name = Column.EstimatedTotalMonthlySavings, Hidden = true },
                    new FieldDefn{ Name = Column.FutureRealDaysRemaining, Hidden = true },
                    new FieldDefn{ Name = Column.FutureRealMonthsRemaining, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeNo },

                    // boolean columns
                    new FieldDefn{ Name = Column.JDEConfirmed, Hidden = true },
                    new FieldDefn{ Name = Column.InProcessStatus, Hidden = true },
                    new FieldDefn{ Name = Column.ProposedStatus, Hidden = true },
                    new FieldDefn{ Name = Column.ImplementationStatus, Hidden = true },
                    new FieldDefn{ Name = Column.ApprovalStatus, Hidden = true },
                    new FieldDefn{ Name = Column.Rollup, Hidden = true },
                    new FieldDefn{ Name = Column.Update, Hidden = true },
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostAvoidance
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostAvoidance,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A27141904",
                    Group = "com.crownpack",
                    Description = "Defines the base Cost Avoidance type initiative.",
                    Fields = new FieldDefn[ ] {
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostAvoidanceImplemented
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostAvoidanceImplemented,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190401",
                    Group = "com.crownpack",
                    Description = "Defines the Cost Avoidance implemented initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo, Required = true },
                    new FieldDefn{ Name = Column.NewItemNo, Required = true },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice, Required = true },
                    new FieldDefn{ Name = Column.NewPrice, Required = true },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Required = true },
                    new FieldDefn{ Name = Column.EAU, Required = true },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal, Required = true },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostAvoidanceInProcess
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostAvoidanceInProcess,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190403",
                    Group = "com.crownpack",
                    Description = "Defines the Cost Avoidance in process initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo, Required = true },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice, Required = true },
                    new FieldDefn{ Name = Column.NewPrice, Required = true },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Required = true },
                    new FieldDefn{ Name = Column.EAU, Required = true },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostAvoidanceProposed
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostAvoidanceProposed,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190402",
                    Group = "com.crownpack",
                    Description = "Defines the Cost Avoidance proposed initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostReduction
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostReduction,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A27141901",
                    Group = "com.crownpack",
                    Description = "Defines the base Cost Reduction type initiative.",
                    Fields = new FieldDefn[ ] {
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostReductionImplemented
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostReductionImplemented,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190101",
                    Group = "com.crownpack",
                    Description = "Defines the Cost Reduction implemented initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo, Required = true },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice, Required = true },
                    new FieldDefn{ Name = Column.NewPrice, Required = true },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Required = true },
                    new FieldDefn{ Name = Column.EAU, Required = true },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal, Required = true },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostReductionInProcess
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostReductionInProcess,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190103",
                    Group = "com.crownpack",
                    Description = "Defines the Cost Reduction in process initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice, Required = true },
                    new FieldDefn{ Name = Column.NewPrice, Required = true },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Required = true },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CostReductionProposed
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CostReductionProposed,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190102",
                    Group = "com.crownpack",
                    Description = "Defines the Cost Reduction proposed initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CustomerProvided
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CustomerProvided,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A27141902",
                    Group = "com.crownpack",
                    Description = "Defines the base Customer Provided type initiative.",
                    Fields = new FieldDefn[ ] {
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CustomerProvidedImplemented
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CustomerProvidedImplemented,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190201",
                    Group = "com.crownpack",
                    Description = "Defines the Customer Provided implemented initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal, Required = true },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CustomerProvidedInProcess
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CustomerProvidedInProcess,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190203",
                    Group = "com.crownpack",
                    Description = "Defines the Customer Provided in process initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn CustomerProvidedProposed
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.CustomerProvidedProposed,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190202",
                    Group = "com.crownpack",
                    Description = "Defines the Customer Provided proposed initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn ProductRedesign
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.ProductRedesign,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A27141903",
                    Group = "com.crownpack",
                    Description = "Defines the base Product Redesign type initiative.",
                    Fields = new FieldDefn[ ] {
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn ProductRedesignImplemented
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.ProductRedesignImplemented,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190301",
                    Group = "com.crownpack",
                    Description = "Defines the Product Redesign implemented initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo, Required = true },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice, Required = true },
                    new FieldDefn{ Name = Column.NewPrice, Required = true },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Required = true },
                    new FieldDefn{ Name = Column.EAU, Required = true },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal, Required = true },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn ProductRedesignInProcess
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.ProductRedesignInProcess,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190303",
                    Group = "com.crownpack",
                    Description = "Defines the Product Redesign in process initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo, Required = true },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice, Required = true },
                    new FieldDefn{ Name = Column.UnitSavings, Required = true },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Required = true },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn ProductRedesignProposed
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.ProductRedesignProposed,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A2714190302",
                    Group = "com.crownpack",
                    Description = "Defines the Product Redesign proposed initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion, Required = true },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate, Required = true },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                   }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn RollupInitiative
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.RollupInitiative,
                    ContentTypeId = "0x01002F69F6AAD3DF0E4A97DF91F282F91838",
                    Group = "com.crownpack",
                    Description = "Defines the rolled-up initiative.",
                    TitleName = "Initiative Description",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.InitiativeDisplayUrl, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeEditUrl },
                    new FieldDefn{ Name = Column.InitiativeListID, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeItemID, Hidden = true },
                    new FieldDefn{ Name = Column.InitiativeDetail },
                    new FieldDefn{ Name = Column.InitiativeNo },
                    new FieldDefn{ Name = Column.LocationName },
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame },
                    new FieldDefn{ Name = Column.ExpirationDate },
                    new FieldDefn{ Name = Column.Status },
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings },
                    new FieldDefn{ Name = Column.UnitOfMeasure, Hidden = true },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.EstimatedTotalSavings },
                    new FieldDefn{ Name = Column.CostSavingsType },
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    // TODO missing Sales Rep No
                    new FieldDefn{ Name = Column.SalesrepName },
                    new FieldDefn{ Name = Column.SalesrepPhone },
                    new FieldDefn{ Name = Column.SalesrepEmailAddress },
                    new FieldDefn{ Name = Column.Address1 },
                    new FieldDefn{ Name = Column.City },
                    new FieldDefn{ Name = Column.St },
                    new FieldDefn{ Name = Column.Zip },
                    new FieldDefn{ Name = Column.NA_ManagerNo },
                    new FieldDefn{ Name = Column.NA_ManagerName },
                    new FieldDefn{ Name = Column.DivisionCode },
                    new FieldDefn{ Name = Column.SectorCode },
                    new FieldDefn{ Name = Column.GroupCode },
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.Branch },
                    new FieldDefn{ Name = Column.BranchName },
                    new FieldDefn{ Name = Column.BranchManager },
                    new FieldDefn{ Name = Column.BMBusPhone },
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail },
                    new FieldDefn{ Name = Column.RejectionDate },
                    new FieldDefn{ Name = Column.RejectionReason },
                    new FieldDefn{ Name = Column.ParentCustomerNo },
                    new FieldDefn{ Name = Column.ParentCustomerName },
                    new FieldDefn{ Name = Column.Archived },
                    // TODO add content type name
                    new FieldDefn{ Name = Column.LocationNo },
                    //new FieldDefn{ Name = Column.IDDupe },
                    // TODO missing column?
                    new FieldDefn{ Name = Column.ApprovalStatus, Hidden = true },
                    new FieldDefn{ Name = Column.CalendarDaysRemaining, Hidden = true },
                    new FieldDefn{ Name = Column.CalendarMonthsRemainingInCurrentYear, Hidden = true },
                    new FieldDefn{ Name = Column.DaysProcessedDaysProposed, Hidden = true },
                    new FieldDefn{ Name = Column.DaysOld, Hidden = true },
                    new FieldDefn{ Name = Column.DaysInProcess, Hidden = true },
                    new FieldDefn{ Name = Column.DaysProposed, Hidden = true },
                    new FieldDefn{ Name = Column.EstimatedTotalMonthlySavings, Hidden = true },
                    new FieldDefn{ Name = Column.FutureRealDaysRemaining, Hidden = true },
                    new FieldDefn{ Name = Column.FutureRealMonthsRemaining, Hidden = true },
                    new FieldDefn{ Name = Column.ImplementationStatus, Hidden = true },
                    new FieldDefn{ Name = Column.ImplementationDate, Hidden = true },
                    new FieldDefn{ Name = Column.InProcessDate, Hidden = true },
                    new FieldDefn{ Name = Column.InProcessStatus, Hidden = true },
                    new FieldDefn{ Name = Column.JDEConfirmed, Hidden = true },
                    new FieldDefn{ Name = Column.JDECostSavingsNo, Hidden = true },
                    new FieldDefn{ Name = Column.NA_ManagerEmailAddress, Hidden = true },
                    new FieldDefn{ Name = Column.NA_ManagerPhone, Hidden = true },
                    new FieldDefn{ Name = Column.ProposedDate, Hidden = true },
                    new FieldDefn{ Name = Column.ProposedStatus, Hidden = true },
                    new FieldDefn{ Name = Column.RealizationBalance, Hidden = true },
                    new FieldDefn{ Name = Column.RealizationBalance2, Hidden = true },
                    new FieldDefn{ Name = Column.RemainingCurrentYearBalance, Hidden = true },
                    new FieldDefn{ Name = Column.RemainingInitiativeBalance, Hidden = true },
                    new FieldDefn{ Name = Column.Salesrep, Hidden = true },
                    new FieldDefn{ Name = Column.YearEnd, Hidden = true },
                    }.Distinct( ).ToList( )
                };
            }
        }

        public static ContentTypeDefn UnknownInitiative
        {
            get
            {
                return new ContentTypeDefn
                {
                    Name = ContentTypeName.UnknownInitiative,
                    ContentTypeId = "0x0100F588B5C326BF124E802CB9BE1A27141905",
                    Group = "com.crownpack",
                    Description = "Defines the unknown initiative.",
                    Fields = new FieldDefn[ ] {
                    new FieldDefn{ Name = Column.LocationNo }, // VIEW ONLY
                    new FieldDefn{ Name = Column.LocationName }, // VIEW ONLY
                    new FieldDefn{ Name = Column.ProductCategory, Required = true },
                    new FieldDefn{ Name = Column.PlantChampion },
                    new FieldDefn{ Name = Column.PlantChampionTitle },
                    new FieldDefn{ Name = Column.PlantChampionTelephone },
                    new FieldDefn{ Name = Column.PlantChampionEmail },
                    new FieldDefn{ Name = Column.RealizationDate },
                    new FieldDefn{ Name = Column.InitiativeTimeFrame }, // EDIT ONLY
                    new FieldDefn{ Name = Column.Status }, // VIEW ONLY
                    new FieldDefn{ Name = Column.OriginalItemNo },
                    new FieldDefn{ Name = Column.NewItemNo },
                    new FieldDefn{ Name = Column.ItemDescriptionOfNewItem },
                    new FieldDefn{ Name = Column.CustomerPartNo },
                    new FieldDefn{ Name = Column.CustomerPartNoDescription },
                    new FieldDefn{ Name = Column.OriginalPrice },
                    new FieldDefn{ Name = Column.NewPrice },
                    new FieldDefn{ Name = Column.UnitSavings },
                    new FieldDefn{ Name = Column.UnitOfMeasure },
                    new FieldDefn{ Name = Column.EAU },
                    new FieldDefn{ Name = Column.CostSavingsType }, // VIEW ONLY
                    new FieldDefn{ Name = Column.EstimatedTotalSavingsTotal },
                    new FieldDefn{ Name = Column.SalesrepName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepPhone }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SalesrepEmailAddress }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Address1 }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.City }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.St }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Zip }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.DivisionCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.NA_ManagerName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.SectorCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.GroupCode }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.CustomerInitiativeNumber },
                    new FieldDefn{ Name = Column.BranchManager }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.BMBusPhone }, 
                    new FieldDefn{ Name = Column.BMPhone },
                    new FieldDefn{ Name = Column.ManagerEMail }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.RejectionDate }, // EDIT ONLY
                    new FieldDefn{ Name = Column.RejectionReason }, // EDIT ONLY
                    new FieldDefn{ Name = Column.BranchName }, // VIEW ONLY X INFO
                    new FieldDefn{ Name = Column.Archived }, // EDIT ONLY
                    }.Distinct( ).ToList( )
                };
            }
        }

        #endregion Properties

        #region Methods

        public override void Create( )
        {
            base.Create( );
            CreateContentType( RollupInitiative );
            CreateContentType( BaseInitiative );
            CreateContentType( CostAvoidance );
            CreateContentType( CostAvoidanceImplemented );
            CreateContentType( CostAvoidanceInProcess );
            CreateContentType( CostAvoidanceProposed );
            CreateContentType( CostReduction );
            CreateContentType( CostReductionImplemented );
            CreateContentType( CostReductionInProcess );
            CreateContentType( CostReductionProposed );
            CreateContentType( CustomerProvided );
            CreateContentType( CustomerProvidedImplemented );
            CreateContentType( CustomerProvidedInProcess );
            CreateContentType( CustomerProvidedProposed );
            CreateContentType( ProductRedesign );
            CreateContentType( ProductRedesignImplemented );
            CreateContentType( ProductRedesignInProcess );
            CreateContentType( ProductRedesignProposed );
            CreateContentType( UnknownInitiative );
        }

        public override void Delete( )
        {
            base.Delete( );
            DeleteContentType( CostAvoidanceImplemented );
            DeleteContentType( CostAvoidanceInProcess );
            DeleteContentType( CostAvoidanceProposed );
            DeleteContentType( CostReductionImplemented );
            DeleteContentType( CostReductionInProcess );
            DeleteContentType( CostReductionProposed );
            DeleteContentType( CustomerProvidedImplemented );
            DeleteContentType( CustomerProvidedInProcess );
            DeleteContentType( CustomerProvidedProposed );
            DeleteContentType( ProductRedesignImplemented );
            DeleteContentType( ProductRedesignInProcess );
            DeleteContentType( ProductRedesignProposed );
            DeleteContentType( CostAvoidance );
            DeleteContentType( CostReduction );
            DeleteContentType( CustomerProvided );
            DeleteContentType( ProductRedesign );
            DeleteContentType( UnknownInitiative );
            DeleteContentType( BaseInitiative );
            DeleteContentType( RollupInitiative );
        }

        #endregion Methods
    }
}